import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
Vue.use(Vuex)

export default new Vuex.Store({
  plugins: [createPersistedState()],
  state: {
    issidebarShow:true,
    istabbarShow:true,
    InputValue: '',
    dataList: [],
    isEnd: false // 判断滚动加载是否完成,加载的数据自带的属性
  },
  mutations: {
    show(state){
      state.issidebarShow=true
    },
    hide(state){
      state.issidebarShow=false
    },
    show1(state){
      state.istabbarShow=true
    },
    hide1(state){
      state.istabbarShow=false
    },
    UpdateInputValue (state, value) {
      state.InputValue = value
    },
    setDataList (state, value) {
      state.dataList = value
    },
    modifyIsEnd (state, value) {
      state.isEnd = value
    }
  },
  actions: {
  },
  modules: {
  }
})
